#!/bin/bash

 mkdir -p ~/workspace/virtual-machines/images

# 下载CentOS7 box文件
echo '=================================== Downloading CentOS-7 box image... ==================================='
wget https://mirrors.ustc.edu.cn/centos-cloud/centos/7/vagrant/x86_64/images/CentOS-7.box -P ~/workspace/virtual-machines/images
echo '=================================== Downloaded CentOS-7 box image ! ==================================='

# 添加到vagrant仓
vagrant box add CentOS-7 ~/workspace/virtual-machines/images/CentOS-7.box

# 查看box
vagrant box list

echo '=================================== Add CentOS-7 box image success! ==================================='
